<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="test"></div>
    <script src="../lib/react.development.js"></script>
    <script src="../lib//react-dom.development.js"></script>
    <script src="../lib/babel.min.js"></script>
    <script type="text/babel"> 
    class MyComponent extends React.Component{
        accept=(event)=>{
console.log(event)
console.log(event.target.value)
        }
        render(){
            return (
                <div>
                    <ul onClick={this.accept}>
                        <li>1</li>
                        <li>2</li>
                        </ul>
                <h2>事件处理:也就是js中的事件委托(事件冒泡),然后就是事件也有event，也可以通过他访问自身dom的属性
                    ,所以可以不用ref就别用</h2>
                <input type="text" placeholder="请输入内容" onBlur={this.accept}/>
                </div>
            )
        }
    }
    ReactDOM.render(<MyComponent/>,document.getElementById('test'))
    </script>
</body>
</html>